
declare var isEditorMode: boolean;

function runningIsEditorMode() {
    if (typeof isEditorMode !== "undefined" && isEditorMode == true) {
        return true;
    } else {
        return false;
    }
}

if (runningIsEditorMode()) {
    core.registerSystem(new GameEngineEditorModeDestoryLifeCycleSystem());
    core.registerSystem(new GameEngineRenderSystem());
    core.registerSystem(new EditorApiSystem);
} else {
    core.registerSystem(new GameEnginePlayModeLifeCycleSystem());
    core.registerSystem(new GameEngineRenderSystem());
    core.registerSystem(new GameEngineMouseListenerSystem());
}

core.registerBehaviour(audioPlayer);
core.registerBehaviour(Transform);
core.registerBehaviour(ImageRenderer);
core.registerBehaviour(TextRenderer);
core.registerBehaviour(LineRenderer);
core.registerBehaviour(RectangleRenderer);
core.registerBehaviour(CricleRenderer);


setTimeout(() => {
    core.start(() => {
        core.changeScene("data.json");
    });
}, 1000)


    // core.start("./bb.json");
